<!doctype html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-touch-fullscreen" content="yes">
    <title>hashchange history</title>
</head>
<body>
<button onclick="window.location.hash='#t'+(+new Date())">
    设置hash
</button>
<style>#test {
    height: 30px;
    margin: 20px auto;
    border: 1px solid #aaa;
    line-height: 2;
}</style>
<div id="test"></div>

<script src="/kissy/build/seed.js" charset="utf-8"></script>
<script src="/kissy/src/package.js"></script>

<script>
    KISSY.use("dom,event/dom", function (S, Dom, Event) {
        Event.on(window, "hashchange", function (ev) {
            Dom.get('#test').innerHTML = location.hash;
        });
    });

</script>
</body>
</html>
